<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">
		<title>My JSP 'index.jsp' starting page</title>
	</head>
	<body>
		<center>
			<h3>
				添加新闻
			</h3>
			<h3>
				<a href="/Struts2new/listNews.jsp">查看新闻</a>
			</h3>
		</center>
		<table align="center" width="40%">
			<tr>
				<td>
					<s:fielderror cssStyle="color:red;" />
				</td>
			</tr>
		</table>
		<s:form action="../Struts2new/add2.action" theme="simple">
			<table align="center" width="40%" border="1">
				<tr>
					<td>
						作者：
					</td>
					<td>
						<s:textfield name="news.name"  label="作者" tooltip="请输入作者"></s:textfield>
					</td>
				</tr>
				<tr>
					<td>
						E-mail：
					</td>
					<td>
						<s:textfield name="news.email" label="email"></s:textfield>
					</td>
				</tr>
				<tr>
					<td>
						新闻标题：
					</td>
					<td>
						<s:textfield name="news.title" label="标题"></s:textfield>
					</td>
				</tr>
				<tr height="200">
					<td>
						内容：
					</td>
					<td>
						<s:textarea name="news.content" label="内容"
							cssStyle="height:180px;witdth:50px;"></s:textarea>
					</td>
				</tr>
				<tr>
					<td>
						<s:submit value="添加新闻" />
					</td>
					<td>
						<s:reset value="重置" />
					</td>
				</tr>
			</table>
		</s:form>
	</body>
</html>
